﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Images.aspx.cs" Inherits="ProjectQuaDep.Admin.AwardsImages.Images" %>

<%@ Register Src="../ControlAdmin/header-html.ascx" TagName="header" TagPrefix="uc1" %>
<%@ Register Src="../ControlAdmin/Header.ascx" TagName="Header" TagPrefix="uc2" %>
<%@ Register Src="../ControlAdmin/Footer.ascx" TagName="Footer" TagPrefix="uc3" %>
<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<style type="text/css">
    .style2
    {
        height: 34px;
    }
</style>
<uc1:header ID="header1" runat="server" />
<body>
    <form id="form1" runat="server">
    <div class="wp100">
        <!--end header-->
        <uc2:Header ID="Header2" runat="server" />
        <div class="sanpham_vc">
            <div class="top_content">
                <h2 class="wp_auto">
                    Ai giống ai - Ảnh tham gia<span>
                        <%@ register src="../ControlAdmin/SubMenuVongThi.ascx" tagname="SubMenuVongThi" tagprefix="uc4" %>
                        <uc4:SubMenuVongThi ID="SubMenuVongThi1" runat="server" />
                    </span>
                </h2>
            </div>
            <!--end top_content-->
            <div class="wp_auto tin_tuc">
                <div class="clear">
                </div>
                <div class="contentadmin">
                    <asp:Panel ID="pnUpdate" runat="server" Visible="false">
                        <fieldset style="padding: 10px">
                            <legend><b>XỬ LÝ THÔNG TIN</b></legend>
                            <table width="100%" style="line-height: 30px">
                                <tr>
                                    <td class="style1">
                                        Mã:
                                    </td>
                                    <td>
                                        <asp:Label ID="lblID" runat="server" Text=""></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style1">
                                        Sử Dụng:
                                    </td>
                                    <td>
                                        <asp:FileUpload ID="fuUploadAnh" runat="server" />
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style1">
                                    </td>
                                    <td>
                                        <asp:Button ID="cmdUpdate" runat="server" Text="Cập nhật" OnClick="cmdUpdate_Click" />
                                        &nbsp;<asp:Button ID="cmdHide" runat="server" OnClick="cmdHide_Click" Text="Ẩn đi" />
                                        &nbsp;<asp:Label ID="lblMs" runat="server" ForeColor="#CC0000"></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </fieldset>
                    </asp:Panel>
                    <table cellpadding="5px" cellspacing="10px" width="100%">
                        <tr style="display: none">
                            <td>
                                <b>Từ Ngày: </b>
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox1" runat="server" Width="201px"></asp:TextBox>
                            </td>
                            <td>
                                <b>Đến Ngày: </b>
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox2" runat="server" Width="201px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4">
                                <hr />
                                <asp:DropDownList ID="ddlChontheoquyche" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlChontheoquyche_SelectedIndexChanged">
                                    <asp:ListItem Selected="True" Value="1">Hiện Theo Vòng</asp:ListItem>
                                    <asp:ListItem Value="2">Hiện Tất Cả</asp:ListItem>
                                </asp:DropDownList>
                                <hr />
                                <asp:RadioButtonList ID="rbCount" runat="server" CellSpacing="5" RepeatColumns="10"
                                    AutoPostBack="True" OnSelectedIndexChanged="rbCount_SelectedIndexChanged">
                                    <asp:ListItem Value="0" Selected="True"> Không dùng </asp:ListItem>
                                    <asp:ListItem Value="1"> Like FB </asp:ListItem>
                                    <asp:ListItem Value="2"> Comment </asp:ListItem>
                                    <asp:ListItem Value="3"> Shared </asp:ListItem>
                                    <asp:ListItem Value="4"> Vote Web </asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4">
                                <hr />
                                <asp:RadioButtonList ID="rbStatus" runat="server" CellSpacing="5" RepeatColumns="10"
                                    AutoPostBack="True" OnSelectedIndexChanged="rbStatus_SelectedIndexChanged">
                                    <asp:ListItem Value="-1" Selected="True"> Tất cả </asp:ListItem>
                                    <asp:ListItem Value="0"> chưa duyệt </asp:ListItem>
                                    <asp:ListItem Value="1"> Đã duyệt </asp:ListItem>
                                    <asp:ListItem Value="2"> Trao giải </asp:ListItem>
                                    <asp:ListItem Value="3"> Đã khóa </asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                    </table>
                    <table cellpadding="5px" cellspacing="10px">
                        <tr>
                            <td class="style2">
                                <asp:ImageButton ID="cmdSearch" runat="server" ImageUrl="/Images/icon/search.png"
                                    OnClick="cmdSearch_Click" />
                            </td>
                            <td class="style2">
                                <asp:TextBox ID="txtSearch" runat="server" Width="277px"></asp:TextBox>
                            </td>
                            <td class="style2">
                                <asp:ImageButton ID="cmdAdd" runat="server" ImageUrl="/Images/icon/Add.png" OnClick="cmdAdd_Click" />
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlRound" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlRound_SelectedIndexChanged">
                                    <asp:ListItem Value="0">Tất cả</asp:ListItem>
                                    <asp:ListItem Value="1">Vòng 1</asp:ListItem>
                                    <asp:ListItem Value="2">Vòng 2</asp:ListItem>
                                    <asp:ListItem Value="3">Vòng 3</asp:ListItem>
                                    <asp:ListItem Value="4">Vòng 4</asp:ListItem>
                                    <asp:ListItem Value="5">Vòng 5</asp:ListItem>
                                    <asp:ListItem Value="6">Vòng 6</asp:ListItem>
                                    <asp:ListItem Value="7">Vòng 7</asp:ListItem>
                                    <asp:ListItem Value="8">Vòng 8</asp:ListItem>
                                    <asp:ListItem Value="9">Vòng 9</asp:ListItem>
                                    <asp:ListItem Value="10">Vòng 10</asp:ListItem>
                                    <asp:ListItem Value="11">Vòng 11</asp:ListItem>
                                    <asp:ListItem Value="12">Vòng 12</asp:ListItem>
                                    <asp:ListItem></asp:ListItem>
                                </asp:DropDownList>
                            </td>
                            <td class="style2">
                                <asp:DropDownList ID="ddlSetGiai" runat="server">
                                </asp:DropDownList>
                            </td>
                            <td class="style2">
                                Vote ảo:<asp:TextBox ID="txtVoteV" runat="server" Text="0" Width="50px"></asp:TextBox>
                            </td>
                            <td class="style2">
                                <asp:Label ID="lblPage" runat="server" ForeColor="#CC0000"></asp:Label>
                            </td>
                        </tr>
                    </table>
                    <hr />
                    <asp:GridView ID="gvShow" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                        OnRowCommand="gvShow_RowCommand" CellPadding="4" Width="100%" BackColor="White"
                        BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" OnPageIndexChanging="gvShow_PageIndexChanging">
                        <Columns>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <div class="noidungadmin">
                                        <img src="<%# Eval("img") %>" width="300px" /><hr />
                                        <div style="float: left; width: 50%; text-align: center">
                                            <a target="_blank" href="/JCropList.aspx?id=<%# Eval("ImageId")%>">List:</a><br />
                                            <img src="<%# Eval("ImgThumbList") %>" width="70px" />
                                        </div>
                                        <div style="float: left; width: 50%; text-align: center">
                                            <a target="_blank" href="/JCrop.aspx?id=<%# Eval("ImageId")%>">Home: </a>
                                            <br />
                                            <img src="<%# Eval("ImgThumb") %>" width="70px" />
                                        </div>
                                        <div class="clear">
                                        </div>
                                    </div>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <div class="noidungadmin">
                                        <%--<b>Tiêu đề Ảnh:</b>
                                        <%# Eval("title") %><br />--%>
                                        <%-- <b>Tiêu điểm:</b>
                                        <%# Eval("tieudiem") %>--%>
                                        <b>Ảnh thi vòng
                                            <%# Eval("RoundAwards")%></b>
                                        <br />
                                        <b>Người gửi:</b>
                                        <%# Eval("name")%>(ID:<%# Eval("ImageId")%>) - <b>Trạng thái:</b>
                                        <%# Eval("trangthai") %>
                                        <br />
                                        <b>Thông tin:</b>
                                        <%# Eval("email") %>
                                        -
                                        <%# Eval("phone") %>
                                        -
                                        <%# Eval("Address")%>
                                        <br />
                                        <b>Nội dung tóm tắt:</b>
                                        <%# Eval("ShortContent")%>
                                        <br />
                                        <b>LikeFB:</b><%# Eval("LikeFb")%>- <b>Comment:</b><%# Eval("CountComment")%><br />
                                        <b>Shared:</b><%# Eval("CountShare")%>- <b>Vote:</b><%# Eval("likeWeb")%><br />
                                        <b>Ngày đăng:</b>
                                        <%#  DateTime.Parse(Eval("CreateDate").ToString()).ToString("dd/MM/yyyy HH:mm")%>
                                        <br />
                                        <%--<b>Ngày được duyệt:</b>
                                        <%#  DateTime.Parse(Eval("PublicDate").ToString()).ToString("dd/MM/yyyy HH:mm")%>--%>
                                        <b>Sinh nhật:</b>
                                        <%# DateTime.ParseExact(Eval("birthday").ToString(),"yyyyMMdd",null).ToString("dd/MM/yyyy") %>
                                        <br />
                                        <a href="<%# Eval("linkfb").ToString() %>" target="_blank">
                                            <b>Facebook</b>
                                        </a><br />
                                        <br />
                                        <a href="<%=BO.Const.sHttpDomain %><%# Eval("img") %>" target="_blank">Link lấy ảnh gốc của bài thi tại đây !!!</a>
                                    </div>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <div class="noidungadmin">
                                        <asp:ImageButton ID="btnEdit" CommandName="cmdAddVote" CommandArgument='<%# Eval("ImageId") %>'
                                            runat="server" ImageUrl="/Images/icon/Add.png" />
                                        &nbsp;&nbsp;
                                        <asp:ImageButton ID="btnSelect" CommandName="cmdSelect" CommandArgument='<%# Eval("ImageId") %>'
                                            runat="server" ImageUrl="/Images/icon/statusadmin.png" />
                                        <hr />
                                        <asp:Button ID="cmdDuyet" CommandName="cmdDuyet" runat="server" Text="Duyệt" CommandArgument='<%# Eval("ImageId") %>' />
                                        &nbsp;
                                        <asp:Button ID="cmdKhoa" CommandName="cmdKhoa" runat="server" Text="Khóa" CommandArgument='<%# Eval("ImageId") %>' /><br />
                                        <%--<asp:Button ID="cmdTieuDiem" CommandName="cmdTieuDiem" runat="server" Text="Tiêu Điểm" CommandArgument='<%# Eval("ImageId") %>' />--%>
                                        <hr />
                                        <asp:Button ID="cmdUploadAnh" CommandName="cmdUploadAnh" runat="server" Text="Sửa Ảnh" CommandArgument='<%# Eval("ImageId") %>' />
                                        
                                    </div>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
                        <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
                        <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
                        <RowStyle BackColor="White" ForeColor="#003399" />
                        <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
                    </asp:GridView>
                    <asp:Button ID="CmdExcel" runat="server" OnClick="CmdExcel_Click" Text="Xuất Excel" />
                    &nbsp;Lưu file lại tải xong đổi tên thêm đuôi .xls vào là được
                </div>
            </div>
            <!--end auto-->
        </div>
        <!--end sanpham_vc-->
        <!--end footer_bt-->
        <uc3:Footer ID="Footer1" runat="server" />
        <br />
    </div>
    <!--end wp100-->
    </form>
</body>
</html>
